package git.soulbgm.service;

import git.soulbgm.common.handle.TcpServerHandle;
import git.soulbgm.common.socket.TcpServer;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * @author 贺瑞杰
 * @version V1.0
 * @date 2019-04-10 10:19
 * @description
 */
@Component
public class StartTcpServer implements ApplicationRunner {

    @Override
    public void run(ApplicationArguments applicationArguments) throws Exception {
        TcpServer tcpServer = TcpServer.getTcpService(9911);
        tcpServer.start(new TcpServerHandle(tcpServer));
    }
}
